<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BabyOS: b_protocol.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="2.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BabyOS
   &#160;<span id="projectnumber">V1.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b9223522bb56aee4ab59f7ba381d2163.html">bos</a></li><li class="navelem"><a class="el" href="dir_f2a2cc749b6bfcea90db6730434b0bd6.html">core</a></li><li class="navelem"><a class="el" href="dir_7991448cbe81caff9afaadef11b942e8.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">b_protocol.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="b__protocol_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment">/*Includes ----------------------------------------------*/</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="b__protocol_8h.html">b_protocol.h</a>&quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#if _PROTO_ENABLE</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="b__sum_8h.html">b_sum.h</a>&quot;</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="b__tx_8h.html">b_tx.h</a>&quot;</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &lt;string.h&gt;</span></div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="keyword">static</span> <a class="code" href="structb_protocol_info__t.html">bProtocolInfo_t</a>  bProtocolInfo[<a class="code" href="b__config_8h.html#a3c7457486b3e4f532ba0741abfeaf7bb">_PROTO_I_NUMBER</a>];</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="keyword">static</span> uint8_t bProtocolInfoIndex = 0;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="keyword">static</span> uint8_t _bProtocolCalCheck(uint8_t *pbuf, uint8_t len)</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;{</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    uint8_t tmp, i;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    tmp = pbuf[0];</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="keywordflow">for</span>(i = 1;i &lt; len;i++)</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    {</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        tmp += pbuf[i];</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    }</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keywordflow">return</span> tmp;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;} </div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___p_r_o_t_o_c_o_l___exported___functions.html#ga042c82b5764c60b4078866635c8e8c7b">bProtocolRegist</a>(uint32_t <span class="keywordtype">id</span>, uint8_t tx_no, <a class="code" href="group___p_r_o_t_o_c_o_l___exported___types_definitions.html#gad7aec36b9dbeafe443d1168d94320056">pdispatch</a> f)</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;{</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="keywordflow">if</span>(bProtocolInfoIndex &gt;= <a class="code" href="b__config_8h.html#a3c7457486b3e4f532ba0741abfeaf7bb">_PROTO_I_NUMBER</a> || f == <a class="code" href="b__config_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>)</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    {</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    }</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    bProtocolInfo[bProtocolInfoIndex].<a class="code" href="structb_protocol_info__t.html#abaabdc509cdaba7df9f56c6c76f3ae19">id</a> = id;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    bProtocolInfo[bProtocolInfoIndex].<a class="code" href="structb_protocol_info__t.html#a65a520465829a72b4b90e063340fccbb">tx_no</a> = tx_no;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    bProtocolInfo[bProtocolInfoIndex].<a class="code" href="structb_protocol_info__t.html#a2cd7dc696687cda89345c716c8004772">f</a> = f;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    bProtocolInfoIndex += 1;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="keywordflow">return</span> (bProtocolInfoIndex - 1);</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;}</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___p_r_o_t_o_c_o_l___exported___functions.html#gab2aeea9cc3522c03adc155f6650fcb11">bProtocolParse</a>(<span class="keywordtype">int</span> no, uint8_t *pbuf, uint8_t len)</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;{</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <a class="code" href="structb_protocol_head__t.html">bProtocolHead_t</a> *phead = (<a class="code" href="structb_protocol_head__t.html">bProtocolHead_t</a> *)pbuf;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    uint8_t length;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    uint8_t crc;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="keywordflow">if</span>(pbuf == <a class="code" href="b__config_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> || len &lt; (<span class="keyword">sizeof</span>(<a class="code" href="structb_protocol_head__t.html">bProtocolHead_t</a>) + 1) || no &gt;= bProtocolInfoIndex || no &lt; 0)</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    {</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    }</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    </div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="keywordflow">if</span>(phead-&gt;<a class="code" href="structb_protocol_head__t.html#a9794c0e61506b826b49b458708ae2489">head</a> != <a class="code" href="group___p_r_o_t_o_c_o_l___exported___defines.html#ga683ebecc04749cb0016ec5ad14a2d4f2">PROTOCOL_HEAD</a> || (phead-&gt;<a class="code" href="structb_protocol_head__t.html#a658c495cd1900eadce3b800e3ebdac7a">device_id</a> != bProtocolInfo[no].id &amp;&amp; (phead-&gt;<a class="code" href="structb_protocol_head__t.html#a658c495cd1900eadce3b800e3ebdac7a">device_id</a> != 0xffffffff) &amp;&amp; (bProtocolInfo[no].id != 0xffffffff)))</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    {</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    }</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    </div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    length = phead-&gt;<a class="code" href="structb_protocol_head__t.html#a5723e60ffd628510c699eddbce90be23">len</a> + <span class="keyword">sizeof</span>(<a class="code" href="structb_protocol_head__t.html">bProtocolHead_t</a>);</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    <span class="keywordflow">if</span>(length &gt; len)</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    {</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    }  </div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    crc = _bProtocolCalCheck(pbuf, length - 1);</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keywordflow">if</span>(crc != pbuf[length - 1])</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    {</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        <a class="code" href="b__config_8h.html#afc78b16ad8aebf30b9cabfc278cfb32a">b_log</a>(<span class="stringliteral">&quot;crc error!%d %d&quot;</span>, crc, pbuf[length - 1]);</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    }</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    </div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    <span class="keywordflow">return</span> bProtocolInfo[no].<a class="code" href="structb_protocol_info__t.html#a2cd7dc696687cda89345c716c8004772">f</a>(phead-&gt;<a class="code" href="structb_protocol_head__t.html#a4d43e8212bdc9dbee866506f04effcea">cmd</a>, &amp;pbuf[<span class="keyword">sizeof</span>(<a class="code" href="structb_protocol_head__t.html">bProtocolHead_t</a>)], phead-&gt;<a class="code" href="structb_protocol_head__t.html#a5723e60ffd628510c699eddbce90be23">len</a> - 1);</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;}</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___p_r_o_t_o_c_o_l___exported___functions.html#gadcb3551dcf55a58973810c4f348ffb0d">bProtocolSetID</a>(<span class="keywordtype">int</span> no, uint32_t <span class="keywordtype">id</span>)</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;{</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <span class="keywordflow">if</span>(no &gt;= bProtocolInfoIndex || no &lt; 0)</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    {</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    }</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    bProtocolInfo[no].<a class="code" href="structb_protocol_info__t.html#abaabdc509cdaba7df9f56c6c76f3ae19">id</a> = id;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;}</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group___p_r_o_t_o_c_o_l___exported___functions.html#ga4786ed1344ef06ab3c892d1bc72a1658">bProtocolSend</a>(<span class="keywordtype">int</span> no, uint8_t cmd, uint8_t *param, uint8_t param_size)</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;{</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    uint8_t length = 0;</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    <a class="code" href="structb_protocol_head__t.html">bProtocolHead_t</a> *phead;</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    uint8_t tmp_buf[262];</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    <span class="keywordflow">if</span>((param == <a class="code" href="b__config_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> &amp;&amp; param_size &gt; 0) || no &gt;= bProtocolInfoIndex || no &lt; 0)</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    {</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    }</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    phead = (<a class="code" href="structb_protocol_head__t.html">bProtocolHead_t</a> *)tmp_buf;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;    phead-&gt;<a class="code" href="structb_protocol_head__t.html#a9794c0e61506b826b49b458708ae2489">head</a> = <a class="code" href="group___p_r_o_t_o_c_o_l___exported___defines.html#ga683ebecc04749cb0016ec5ad14a2d4f2">PROTOCOL_HEAD</a>;</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    phead-&gt;<a class="code" href="structb_protocol_head__t.html#a658c495cd1900eadce3b800e3ebdac7a">device_id</a> = bProtocolInfo[no].<a class="code" href="structb_protocol_info__t.html#abaabdc509cdaba7df9f56c6c76f3ae19">id</a>;</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;    phead-&gt;<a class="code" href="structb_protocol_head__t.html#a4d43e8212bdc9dbee866506f04effcea">cmd</a> = cmd;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    phead-&gt;<a class="code" href="structb_protocol_head__t.html#a5723e60ffd628510c699eddbce90be23">len</a> = 1 + param_size;</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;    </div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;    memcpy(&amp;tmp_buf[<span class="keyword">sizeof</span>(<a class="code" href="structb_protocol_head__t.html">bProtocolHead_t</a>)], param, param_size);</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    </div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    length = <span class="keyword">sizeof</span>(<a class="code" href="structb_protocol_head__t.html">bProtocolHead_t</a>) + phead-&gt;<a class="code" href="structb_protocol_head__t.html#a5723e60ffd628510c699eddbce90be23">len</a>;</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    </div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;    tmp_buf[length - 1] = _bProtocolCalCheck(tmp_buf, length - 1);</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    </div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="group___t_x___exported___functions.html#gad2ecf5eb42e98c674c128c616fd0f8c4">bTX_Request</a>(bProtocolInfo[no].tx_no, tmp_buf, length, <a class="code" href="group___t_x___exported___defines.html#ga6d352ee8cc1803708ed984fad29f4fd1">BTX_REQ_LEVEL1</a>);</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;}</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;<span class="comment">/************************ Copyright (c) 2019 Bean *****END OF FILE****/</span></div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;</div><div class="ttc" id="group___p_r_o_t_o_c_o_l___exported___functions_html_gab2aeea9cc3522c03adc155f6650fcb11"><div class="ttname"><a href="group___p_r_o_t_o_c_o_l___exported___functions.html#gab2aeea9cc3522c03adc155f6650fcb11">bProtocolParse</a></div><div class="ttdeci">int bProtocolParse(int no, uint8_t *pbuf, uint8_t len)</div></div>
<div class="ttc" id="b__protocol_8h_html"><div class="ttname"><a href="b__protocol_8h.html">b_protocol.h</a></div></div>
<div class="ttc" id="group___p_r_o_t_o_c_o_l___exported___defines_html_ga683ebecc04749cb0016ec5ad14a2d4f2"><div class="ttname"><a href="group___p_r_o_t_o_c_o_l___exported___defines.html#ga683ebecc04749cb0016ec5ad14a2d4f2">PROTOCOL_HEAD</a></div><div class="ttdeci">#define PROTOCOL_HEAD</div><div class="ttdef"><b>Definition:</b> <a href="b__protocol_8h_source.html#l00090">b_protocol.h:90</a></div></div>
<div class="ttc" id="structb_protocol_head__t_html_a658c495cd1900eadce3b800e3ebdac7a"><div class="ttname"><a href="structb_protocol_head__t.html#a658c495cd1900eadce3b800e3ebdac7a">bProtocolHead_t::device_id</a></div><div class="ttdeci">uint32_t device_id</div><div class="ttdef"><b>Definition:</b> <a href="b__protocol_8h_source.html#l00063">b_protocol.h:63</a></div></div>
<div class="ttc" id="structb_protocol_head__t_html_a5723e60ffd628510c699eddbce90be23"><div class="ttname"><a href="structb_protocol_head__t.html#a5723e60ffd628510c699eddbce90be23">bProtocolHead_t::len</a></div><div class="ttdeci">uint8_t len</div><div class="ttdef"><b>Definition:</b> <a href="b__protocol_8h_source.html#l00064">b_protocol.h:64</a></div></div>
<div class="ttc" id="structb_protocol_info__t_html_abaabdc509cdaba7df9f56c6c76f3ae19"><div class="ttname"><a href="structb_protocol_info__t.html#abaabdc509cdaba7df9f56c6c76f3ae19">bProtocolInfo_t::id</a></div><div class="ttdeci">uint32_t id</div><div class="ttdef"><b>Definition:</b> <a href="b__protocol_8h_source.html#l00074">b_protocol.h:74</a></div></div>
<div class="ttc" id="b__config_8h_html_a070d2ce7b6bb7e5c05602aa8c308d0c4"><div class="ttname"><a href="b__config_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a></div><div class="ttdeci">#define NULL</div><div class="ttdef"><b>Definition:</b> <a href="b__config_8h_source.html#l00042">b_config.h:42</a></div></div>
<div class="ttc" id="group___p_r_o_t_o_c_o_l___exported___functions_html_ga042c82b5764c60b4078866635c8e8c7b"><div class="ttname"><a href="group___p_r_o_t_o_c_o_l___exported___functions.html#ga042c82b5764c60b4078866635c8e8c7b">bProtocolRegist</a></div><div class="ttdeci">int bProtocolRegist(uint32_t id, uint8_t tx_no, pdispatch f)</div></div>
<div class="ttc" id="group___t_x___exported___defines_html_ga6d352ee8cc1803708ed984fad29f4fd1"><div class="ttname"><a href="group___t_x___exported___defines.html#ga6d352ee8cc1803708ed984fad29f4fd1">BTX_REQ_LEVEL1</a></div><div class="ttdeci">#define BTX_REQ_LEVEL1</div><div class="ttdef"><b>Definition:</b> <a href="b__tx_8h_source.html#l00086">b_tx.h:86</a></div></div>
<div class="ttc" id="group___t_x___exported___functions_html_gad2ecf5eb42e98c674c128c616fd0f8c4"><div class="ttname"><a href="group___t_x___exported___functions.html#gad2ecf5eb42e98c674c128c616fd0f8c4">bTX_Request</a></div><div class="ttdeci">int bTX_Request(int no, uint8_t *pbuf, uint16_t size, uint8_t flag)</div></div>
<div class="ttc" id="b__sum_8h_html"><div class="ttname"><a href="b__sum_8h.html">b_sum.h</a></div></div>
<div class="ttc" id="structb_protocol_head__t_html"><div class="ttname"><a href="structb_protocol_head__t.html">bProtocolHead_t</a></div><div class="ttdef"><b>Definition:</b> <a href="b__protocol_8h_source.html#l00060">b_protocol.h:60</a></div></div>
<div class="ttc" id="group___p_r_o_t_o_c_o_l___exported___types_definitions_html_gad7aec36b9dbeafe443d1168d94320056"><div class="ttname"><a href="group___p_r_o_t_o_c_o_l___exported___types_definitions.html#gad7aec36b9dbeafe443d1168d94320056">pdispatch</a></div><div class="ttdeci">int(* pdispatch)(uint8_t cmd, uint8_t *param, uint8_t param_len)</div><div class="ttdef"><b>Definition:</b> <a href="b__protocol_8h_source.html#l00070">b_protocol.h:70</a></div></div>
<div class="ttc" id="structb_protocol_head__t_html_a4d43e8212bdc9dbee866506f04effcea"><div class="ttname"><a href="structb_protocol_head__t.html#a4d43e8212bdc9dbee866506f04effcea">bProtocolHead_t::cmd</a></div><div class="ttdeci">uint8_t cmd</div><div class="ttdef"><b>Definition:</b> <a href="b__protocol_8h_source.html#l00065">b_protocol.h:65</a></div></div>
<div class="ttc" id="structb_protocol_info__t_html"><div class="ttname"><a href="structb_protocol_info__t.html">bProtocolInfo_t</a></div><div class="ttdef"><b>Definition:</b> <a href="b__protocol_8h_source.html#l00072">b_protocol.h:72</a></div></div>
<div class="ttc" id="group___p_r_o_t_o_c_o_l___exported___functions_html_gadcb3551dcf55a58973810c4f348ffb0d"><div class="ttname"><a href="group___p_r_o_t_o_c_o_l___exported___functions.html#gadcb3551dcf55a58973810c4f348ffb0d">bProtocolSetID</a></div><div class="ttdeci">int bProtocolSetID(int no, uint32_t id)</div></div>
<div class="ttc" id="b__config_8h_html_afc78b16ad8aebf30b9cabfc278cfb32a"><div class="ttname"><a href="b__config_8h.html#afc78b16ad8aebf30b9cabfc278cfb32a">b_log</a></div><div class="ttdeci">#define b_log(...)</div><div class="ttdef"><b>Definition:</b> <a href="b__config_8h_source.html#l00232">b_config.h:232</a></div></div>
<div class="ttc" id="structb_protocol_info__t_html_a65a520465829a72b4b90e063340fccbb"><div class="ttname"><a href="structb_protocol_info__t.html#a65a520465829a72b4b90e063340fccbb">bProtocolInfo_t::tx_no</a></div><div class="ttdeci">uint8_t tx_no</div><div class="ttdef"><b>Definition:</b> <a href="b__protocol_8h_source.html#l00075">b_protocol.h:75</a></div></div>
<div class="ttc" id="group___p_r_o_t_o_c_o_l___exported___functions_html_ga4786ed1344ef06ab3c892d1bc72a1658"><div class="ttname"><a href="group___p_r_o_t_o_c_o_l___exported___functions.html#ga4786ed1344ef06ab3c892d1bc72a1658">bProtocolSend</a></div><div class="ttdeci">int bProtocolSend(int no, uint8_t cmd, uint8_t *param, uint8_t param_size)</div></div>
<div class="ttc" id="structb_protocol_head__t_html_a9794c0e61506b826b49b458708ae2489"><div class="ttname"><a href="structb_protocol_head__t.html#a9794c0e61506b826b49b458708ae2489">bProtocolHead_t::head</a></div><div class="ttdeci">uint8_t head</div><div class="ttdef"><b>Definition:</b> <a href="b__protocol_8h_source.html#l00062">b_protocol.h:62</a></div></div>
<div class="ttc" id="structb_protocol_info__t_html_a2cd7dc696687cda89345c716c8004772"><div class="ttname"><a href="structb_protocol_info__t.html#a2cd7dc696687cda89345c716c8004772">bProtocolInfo_t::f</a></div><div class="ttdeci">pdispatch f</div><div class="ttdef"><b>Definition:</b> <a href="b__protocol_8h_source.html#l00076">b_protocol.h:76</a></div></div>
<div class="ttc" id="b__tx_8h_html"><div class="ttname"><a href="b__tx_8h.html">b_tx.h</a></div></div>
<div class="ttc" id="b__config_8h_html_a3c7457486b3e4f532ba0741abfeaf7bb"><div class="ttname"><a href="b__config_8h.html#a3c7457486b3e4f532ba0741abfeaf7bb">_PROTO_I_NUMBER</a></div><div class="ttdeci">#define _PROTO_I_NUMBER</div><div class="ttdef"><b>Definition:</b> <a href="b__config_8h_source.html#l00095">b_config.h:95</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
